// bplearn.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "BPNetwork.h"
#include <iostream>

double T_IN[]= 
{
	0.1,
	0.2,
	0.3,
};

double T_OUT[]=
{
	0.8,
	0.7,
	0.6,
};

int _tmain(int argc, _TCHAR* argv[])
{

	BPNetwork net;
	net.Init(1,3);
		
	for(int i=0;i<100000;i++)
	{
		for(int j=0;j<3;j++)
			net.Teach(T_IN[j],T_OUT[j]);
	}

	double dOut;
	for(int i=0;i<10;i++)
	{
		double dIn = i/10.0;
		net.Out(dIn,dOut);  
		std::cout<<dIn << '\t'<< dOut<<std::endl;
	}
	 

	return 0;
}

